package com.senven.shoppingcar.mapper;

import com.senven.common.entity.Branch;
import com.senven.common.entity.Goods;
import com.senven.common.entity.ShoppingTrolley;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 周世玉
 * @since 2022-08-31
 */
@Mapper
public interface ShoppingTrolleyMapper extends BaseMapper<ShoppingTrolley> {

    List<ShoppingTrolley> selectShoppingAll(String userid);

    List<Branch> selectBranchAll(String userid);

    int updateAdd(Integer gid,Integer bid);

    int updateReduce(Integer gid, Integer bid);

    Integer selectNum(Integer gid, Integer bid);

    int addCat(Integer branchid, Integer goodsid, Integer stNum, Boolean isDeleted, Integer goodsPrice, String uid);

    List<ShoppingTrolley> getCat(Integer branchid, Integer goodsid);
    Integer updateIsDeleted(Integer stId);

    List<Branch> selectShopSalesAll(@Param("start") String start, @Param("end") String end);

    List<Goods> selectDisheseSales(Map map);

    String selecBranchid(Object id);

    String selecByIdRole(Object id);

    List<Branch> selectBranchIdAndName(Object roleid,Object branchid);

}
